package com.sq.partner.manager.dao;

import java.util.List;

import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.TradCreditLmtDef;
import com.sq.partner.manager.util.Page;

/**
 * 信用额度定义
 * @author Kang Zhiqiang
 *
 */
public interface ITradCreditLmtDefDao extends BaseDao {

	/**
	 * 根据channelName分页查询TradCreditLmtDef及详细关联信息
	 * @param pageIndex
	 * @param channelName
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public Page queryByChannelName(Integer pageIndex,String channelName,GatewayUser user) throws Exception;
	
	/**
	 * 添加creditLmtDef
	 * @param creditLmtDef
	 * @throws Exception
	 */
	public void save(TradCreditLmtDef creditLmtDef) throws Exception;
	
	/**
	 * 修改creditLmtDef
	 * @param creditLmtDef
	 * @throws Exception
	 */
	public void update(TradCreditLmtDef creditLmtDef) throws Exception;
	
	/**
	 * 校验是否有子机构有额度配置
	 * @param channelCode
	 * @return
	 * @throws Exception
	 */
	public List<TradCreditLmtDef> queryTradCreditLmtDefsByChannelCode(String channelCode) throws Exception;
	
	
	public List<TradCreditLmtDef> queryTradCreditLmtDefs(TradCreditLmtDef creditLmtDef) throws Exception;
}
